package com.qf.app;

import com.qf.enums.DevUserStateEnum;
import com.qf.mapper.DevUserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class AppTask {
    @Autowired
    private DevUserMapper devUserMapper;

    @Scheduled(cron = "0 0 5 * * ?")
    public void deleteNotActiveDevUser(){
        Integer count=devUserMapper.deleteBy3Day(DevUserStateEnum.LOCK.getState());
        log.info("[定时删除未激活用户] 今天删除了{}条",count );
    }

}
